﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Models;
using DAL;

namespace BLL
{
    public class CustomerManager
    {
        //客户信息保存更新
        public static bool UpdateCustomer(Customer c)
        {
            return CustomerServices.UpdateCustomer(c);
        }

        //通过客户ID查询客户信息
        public static Customer SearchCustomersByID(string Id)
        {
            return CustomerServices.SearchCustomersByID(Id);
        }

        //搜索客户业务
        public static List<Customer> SearchCustomersByName(string name)
        {
            return CustomerServices.SearchCustomersByName(name);
        }

        //添加客户业务
        public static bool AddCustomer(Customer c)
        {
            return CustomerServices.AddCustomer(c);
        }

        //删除客户业务
        public static bool DeleteCustomerByID(string cid)
        {
            return CustomerServices.DeleteCustomerByID(cid);
        }

        //获取客户列表业务
        public static List<Customer> CustomersList()
        {
            return CustomerServices.GetCustomers();
        }
    }
}